package cn.xzqwjw.taskmanager.common.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author rush
 */
@Documented
@Target({ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = EmailValidatorClass.class)
public @interface EmailValidator {

  // 用户输入的电子邮箱地址无效时的提示内容
  String message() default "电子邮箱地址格式不正确";

  Class<?>[] groups() default {};

  // payload 针对 Bean
  Class<? extends Payload>[] payload() default {};

}
